package org.androidpn.server.service.impl;

import javax.annotation.Resource;

import org.androidpn.server.dao.FriendDao;
import org.androidpn.server.entity.Friend;
import org.androidpn.server.service.FriendService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * service friend
 * 
 * @author 蔡琪
 * 
 */
@Service("friendService")
public class FriendServiceImpl extends BaseServiceImpl<Friend, Long> implements
		FriendService {

	@Resource(name = "friendDao")
	private FriendDao friendDao;

	@Resource(name = "friendDao")
	public void setBaseDao(FriendDao friendDao) {
		super.setBaseDao(friendDao);
	}

	@Transactional(readOnly = true)
	public Friend findFriend(Long senderId, Long receiverId) {
		return friendDao.findFriend(senderId, receiverId);
	}

}
